package com.proj.hot.utils;

import java.io.IOException;
import java.net.URL;
import android.graphics.drawable.Drawable;
import android.util.Log;

/**
 * 
 * @description: 传值海报的Url，从文件流冲获取Drawable对象
 * @author: zcg
 * @date: 2015-6-12 上午9:30:27
 */
public class LoadImageUtil
{
	static final String TAG = "LoadImageUtil";
	
	public static Drawable loadImageFromNetwork(String imageUrl)
	{
		Drawable drawable = null;
		try
		{
			if (imageUrl != null)
			{
				drawable = Drawable.createFromStream(new URL(imageUrl).openStream(), " ");
			}
			else
			{
			}
		}
		catch (IOException e)
		{
			e.printStackTrace();
			Log.i(TAG, "--->>没有获得Drawable图片");
		}
		return drawable;
	}
}
